package cn.coisini.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.groups.Default;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * @author xiangshaw
 * Description: 分类信息
 */
@Tag(name = "分类信息")
@Getter
@Setter
public class CategoryDto {
    @Schema(description = "主键ID")
    @NotBlank(groups = {Update.class}, message = "分类id不能为空")
    private String id;
    @Schema(description = "分类名称")
    @NotBlank(message = "分类名称不能为空")
    private String categoryName;
    @Schema(description = "分类别名")
    @NotBlank(message = "分类别名不能为空")
    private String categoryAlias;
    @Schema(description = "分类推荐 0不推荐 1推荐")
    private String recommend;
    @Schema(description = "分类首页固定状态 0首页不可移除 1首页可移除")
    private String status;
    @Schema(description = "创建者ID")
    private String createUser;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    //自定义新增校验项分组（默认Default分组）
    public interface Add extends Default {
    }
    //自定义更新校验项分组
    public interface Update extends Default {
    }
}
